<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Model extends CI_Model {
	
	
	/**
	* @var FirePHP
	*/
	//var $firephp;
	
	
	public function __construct() {
		parent::__construct();
	}
	
	
	
	
	
	/**
	* get information about the current logged user
	* @param int $id identification of the current user
	* @return object $result an object with all User information
	*/
	public function getUserInfo($id) {
		if (isset($id)) {
			$this->db->select('*');
			$this->db->from('users');
			$this->db->where('users.id',$id);
			$this->db->join('meta','users.id = meta.user_id');
			$query = $this->db->get();
			$result = $query->result();
			return $result['0'];
		}
		else {
			return null;
		}
	}
	
}